<?php

	include_once '../controladores/ControladorSecciones.php';
	include_once '../clases/section.php';
	
		$usr = $_GET['user'];
		$app = $_GET['app'];
		$sec_name = $_POST['sectionName'];
	
		$nSection = new Section($app,$sec_name,strval(date("d-m-Y")),strval(date("d-m-Y")));
				
		$command = new ControladorSecciones();
				
		$command->sectionCreate($nSection);
				
		$sec = $command->searchSectionId($app,$sec_name);
		
		header("Location:section_elements.php?usr=".$usr."&app=".$app."&sec=".$sec);
?>